<template>
    <div class="team">
        <van-nav-bar
                title="拼团"
                left-arrow
                @click-left="onClickLeft"
        />
        <!--分类栏-->
        <van-tabs  v-model="active">
            <van-tab v-for="index in typ" :title="index.name">
                <van-empty
                        class="custom-image"
                        image="http://www.mescroll.com/img/mescroll-empty.png?v=1"
                        description="~ 空空如也 ~"
                />
            </van-tab>
        </van-tabs>
    </div>
</template>

<script>
    import jsp from '../../Api/Api'

    export default {
        name: "Team",
        data() {
            return {
                active:0,
                typ:[{name:'全部'},]
            }
        },
        created() {
            // 获取分类
            jsp.getToptype().then(data => {
                console.log(data.data)
                this.typ.push(...data.data)
            }).catch(error => console.log(error))
            // 获取拼团信息
            jsp.teamPric().then(data => {
                console.log(data.data)
            }).catch(error => console.log(error))
        },
        methods: {
            onClickLeft() {
                this.$router.go(-1)
            },
        }
    }
</script>

<style scoped>
    >>> .van-nav-bar .van-icon {
        color: #000 !important;
    }

    .van-hairline--bottom::after {
        border: none !important;
    }
</style>